import { createRouter, createWebHistory, createWebHashHistory } from "vue-router"
import routes from "@/router/router"
var router = createRouter({
    history: createWebHashHistory(),
    routes
})
//路由前置守卫；用来设置元信息
router.beforeEach((to, from, next) => {
    if (to.meta.title) {
        document.title = to.meta.title
    }
    next()
})
export default router